package com.guigu.community.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.community.mapper.AdminsMapper;
import com.guigu.community.pojo.Admins;
import com.guigu.community.service.AdminService;
import com.guigu.community.vo.AdminsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl extends ServiceImpl<AdminsMapper, Admins> implements AdminService {
    @Autowired
    private AdminsMapper adminsMapper;

    @Override
    public Admins login(AdminsVo vo) {
        QueryWrapper<Admins> wrapper = new QueryWrapper<>();
        wrapper.eq("adminname",vo.getAdminname());
        return adminsMapper.selectOne(wrapper);
    }
}
